package com.coderman;

import com.alibaba.fastjson.JSON;
import com.coderman.model.AreaConfig;
import us.codecraft.webmagic.Page;
import us.codecraft.webmagic.Site;
import us.codecraft.webmagic.Spider;
import us.codecraft.webmagic.processor.PageProcessor;
import us.codecraft.webmagic.selector.Html;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * description: AreaSpider <br>
 * date: 2020/9/12 0:20 <br>
 * author: coderman <br>
 * version: 1.0 <br>
 */
public class AreaSpider implements PageProcessor {


    static ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> AllURLMap = new ConcurrentHashMap<>();
    private Site site = Site.me()
            .setRetryTimes(4)
            .setSleepTime(2000)
            .setCharset("UTF-8");


    @Override
    public void process(Page page) {
        ConcurrentHashMap<String,String> areaUrlMap = new ConcurrentHashMap<>();
        Html html = page.getHtml();
        List<String> hrefList = html.xpath("/html/body/div[3]/div/div[1]/ul[2]/li/dl[1]/dd/div/a/@href").all();
        List<String> hrefName = html.xpath("/html/body/div[3]/div/div[1]/ul[2]/li/dl[1]/dd/div/a/text()").all();

        String cityUrl = page.getUrl().get();
        for (int i = 0;i < hrefList.size();i++){
            if(hrefList.get(i).equals(cityUrl)){
                continue;
            }
            areaUrlMap.put(hrefName.get(i),hrefList.get(i));
        }

        AllURLMap.forEach((k,v)->{
            v.forEach(areaConfig -> {
                if(areaConfig.getCityUrl().equals(cityUrl)){
                    areaConfig.setUrlMap(areaUrlMap);
                }
            });
        });

    }

    @Override
    public Site getSite() {
        return site;
    }

    /**
     * 初始化所有urlMap
     * @return
     */
    public ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getAllURLMap(){

        //已录入城市-1组
       /* AllURLMap.putAll(getZhejiang());
        AllURLMap.putAll(getAnHui());
        AllURLMap.putAll(getBeijing());*/



       /* AllURLMap.putAll(getShanghai());
        AllURLMap.putAll(getShenzhen());
        AllURLMap.putAll(getChongqing());
        AllURLMap.putAll(getTianjin());*/



        AllURLMap.putAll(getHeBei());
        AllURLMap.putAll(getHeNan());
        AllURLMap.putAll(getHeiLongJiang());
        AllURLMap.putAll(getJiLin());
        AllURLMap.putAll(getLiaoNing());
        AllURLMap.putAll(getFujian());
        AllURLMap.putAll(getJiangsu());
        AllURLMap.putAll(getGuangDong());
        List<String> urlList = new ArrayList<>();
        AllURLMap.forEach((k,v)->{
            v.forEach(x->{
                urlList.add(x.getCityUrl());
            });
        });

        String [] arr = urlList.toArray(new String[]{});
        Spider.create(new AreaSpider()).addUrl(arr).thread(5).run();
        return AllURLMap;
    }

    /**
     * 获取浙江省下的各个行政区url
     * @return
     */
    private static ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getZhejiang(){
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigHangzhou = new AreaConfig();
        areaConfigHangzhou.setCityName("杭州市");
        areaConfigHangzhou.setCityUrl("https://hz.loupan.com/community/");

        AreaConfig areaConfigWenzhou = new AreaConfig();
        areaConfigWenzhou.setCityUrl("https://wz.loupan.com/community/");
        areaConfigWenzhou.setCityName("温州市");

        AreaConfig areaConfigJinhua = new AreaConfig();
        areaConfigJinhua.setCityName("金华市");
        areaConfigJinhua.setCityUrl("https://jh.loupan.com/community/");

        AreaConfig areaConfigNingbo = new AreaConfig();
        areaConfigNingbo.setCityName("宁波市");
        areaConfigNingbo.setCityUrl("https://nb.loupan.com/community/");


        AreaConfig areaConfigYiwu = new AreaConfig();
        areaConfigYiwu.setCityUrl("https://yw.loupan.com/community/");
        areaConfigYiwu.setCityName("义乌市");


        areaConfigList.add(areaConfigHangzhou);
        areaConfigList.add(areaConfigWenzhou);
        areaConfigList.add(areaConfigJinhua);
        areaConfigList.add(areaConfigNingbo);

        urlMap.put("浙江省",areaConfigList);
        return urlMap;
    }

    /**
     * 获取北京市下的各个行政区的url
     * @return
     */
    private static ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getBeijing(){
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigBeijing = new AreaConfig();
        areaConfigBeijing.setCityName("北京");
        areaConfigBeijing.setCityUrl("https://bj.loupan.com/community/");
        areaConfigList.add(areaConfigBeijing);
        urlMap.put("北京市",areaConfigList);
        return urlMap;
    }

    /**
     * 获取上海市下的各个行政区的url
     * @return
     */
    private static ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getShanghai(){
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigBeijing = new AreaConfig();
        areaConfigBeijing.setCityName("上海");
        areaConfigBeijing.setCityUrl("https://sh.loupan.com/community/");
        areaConfigList.add(areaConfigBeijing);
        urlMap.put("上海市",areaConfigList);
        return urlMap;
    }

    /**
     * 获取重庆市下的各个行政区的url
     * @return
     */
    private static ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getChongqing(){
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigBeijing = new AreaConfig();
        areaConfigBeijing.setCityName("重庆");
        areaConfigBeijing.setCityUrl("https://cq.loupan.com/community/");
        areaConfigList.add(areaConfigBeijing);
        urlMap.put("重庆市",areaConfigList);
        return urlMap;
    }

    /**
     * 获取天津市下的各个行政区的url
     * @return
     */
    private static ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getTianjin(){
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigBeijing = new AreaConfig();
        areaConfigBeijing.setCityName("天津");
        areaConfigBeijing.setCityUrl("https://tj.loupan.com/community/");
        areaConfigList.add(areaConfigBeijing);
        urlMap.put("天津市",areaConfigList);
        return urlMap;
    }



    /**
     * 获取深圳市下的各个行政区的url
     * @return
     */
    private static ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getShenzhen(){
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigBeijing = new AreaConfig();
        areaConfigBeijing.setCityName("深圳");
        areaConfigBeijing.setCityUrl("https://sz.loupan.com/community/");
        areaConfigList.add(areaConfigBeijing);
        urlMap.put("深圳市",areaConfigList);
        return urlMap;
    }


    /**
     * 获取安徽省下的各个行政区的url
     * @return
     */
    private ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getAnHui(){
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigHeFei = new AreaConfig();
        areaConfigHeFei.setCityName("合肥市");
        areaConfigHeFei.setCityUrl("https://hf.loupan.com/community/");

        AreaConfig areaConfigHuangShan = new AreaConfig();
        areaConfigHuangShan.setCityUrl("https://huangshan.loupan.com/community/");
        areaConfigHuangShan.setCityName("黄山市");
        areaConfigList.add(areaConfigHeFei);
        areaConfigList.add(areaConfigHuangShan);

        urlMap.put("安徽省",areaConfigList);
        return urlMap;
    }

    /**
     * 获取河南省下的各个行政区的url
     * @return
     */
    private ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getHeNan(){
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigZhengzhou = new AreaConfig();
        areaConfigZhengzhou.setCityName("郑州市");
        areaConfigZhengzhou.setCityUrl("https://zz.loupan.com/community/");

        AreaConfig areaConfigLuoyang = new AreaConfig();
        areaConfigLuoyang.setCityUrl("https://ly.loupan.com/community/");
        areaConfigLuoyang.setCityName("洛阳市");


        AreaConfig areaConfigKaiFeng = new AreaConfig();
        areaConfigKaiFeng.setCityUrl("https://kaifeng.loupan.com/community/");
        areaConfigKaiFeng.setCityName("开封市");



        areaConfigList.add(areaConfigZhengzhou);
        areaConfigList.add(areaConfigLuoyang);
        areaConfigList.add(areaConfigKaiFeng);

        urlMap.put("河南省",areaConfigList);
        return urlMap;
    }

    /**
     * 获取河北省下的各个行政区的url
     * @return
     */
    private ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getHeBei(){
        //石家庄 唐山 保定 秦皇岛 廊坊 张家口 燕郊


        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigShijiazhuang = new AreaConfig();
        areaConfigShijiazhuang.setCityName("石家庄市");
        areaConfigShijiazhuang.setCityUrl("https://sjz.loupan.com/community/");

        AreaConfig areaConfigTangShan = new AreaConfig();
        areaConfigTangShan.setCityUrl("https://ts.loupan.com/community/");
        areaConfigTangShan.setCityName("唐山市");


        AreaConfig areaConfigBaoding = new AreaConfig();
        areaConfigBaoding.setCityUrl("https://bd.loupan.com/community/");
        areaConfigBaoding.setCityName("保定市");

        AreaConfig areaConfigQinhuangDao = new AreaConfig();
        areaConfigQinhuangDao.setCityUrl("https://qhd.loupan.com/community/");
        areaConfigQinhuangDao.setCityName("秦皇岛市");

        areaConfigList.add(areaConfigShijiazhuang);
        areaConfigList.add(areaConfigTangShan);
        areaConfigList.add(areaConfigBaoding);
        areaConfigList.add(areaConfigQinhuangDao);

        urlMap.put("河北省",areaConfigList);
        return urlMap;
    }

    /**
     * 获取山东省下的各个行政区的url
     * @return
     */
    private ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getShandong(){
        //济南青岛烟台潍坊

        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigJiNan = new AreaConfig();
        areaConfigJiNan.setCityName("济南市");
        areaConfigJiNan.setCityUrl("https://jn.loupan.com/community/");

        AreaConfig areaConfigQingDao = new AreaConfig();
        areaConfigQingDao.setCityUrl("https://qd.loupan.com/community/");
        areaConfigQingDao.setCityName("青岛市");


        AreaConfig areaConfigYanTai = new AreaConfig();
        areaConfigYanTai.setCityUrl("https://yt.loupan.com/community/");
        areaConfigYanTai.setCityName("烟台市");

        AreaConfig areaConfigWeiFang = new AreaConfig();
        areaConfigWeiFang.setCityUrl("https://wf.loupan.com/community/");
        areaConfigWeiFang.setCityName("潍坊市");

        areaConfigList.add(areaConfigJiNan);
        areaConfigList.add(areaConfigQingDao);
        areaConfigList.add(areaConfigYanTai);
        areaConfigList.add(areaConfigWeiFang);

        urlMap.put("山东省",areaConfigList);
        return urlMap;

    }


    /**
     * 获取山西省下的各个行政区的url
     * @return
     */
    private ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getShanXi(){
        //太原临汾大同阳泉
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigTaiYuan = new AreaConfig();
        areaConfigTaiYuan.setCityName("太原市");
        areaConfigTaiYuan.setCityUrl("https://ty.loupan.com/community/");

        AreaConfig areaConfigLinfen = new AreaConfig();
        areaConfigLinfen.setCityUrl("https://linfen.loupan.com/community/");
        areaConfigLinfen.setCityName("临汾市");


        AreaConfig areaConfigDaTong = new AreaConfig();
        areaConfigDaTong.setCityUrl("https://dt.loupan.com/community/");
        areaConfigDaTong.setCityName("大同市");

        AreaConfig areaConfigYangQuan = new AreaConfig();
        areaConfigYangQuan.setCityUrl("https://yq.loupan.com/community/");
        areaConfigYangQuan.setCityName("阳泉市");

        areaConfigList.add(areaConfigTaiYuan);
        areaConfigList.add(areaConfigLinfen);
        areaConfigList.add(areaConfigDaTong);
        areaConfigList.add(areaConfigYangQuan);

        urlMap.put("山西省",areaConfigList);
        return urlMap;
    }


    /**
     * 获取吉林省下的各个行政区的url
     * @return
     */
    private ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getJiLin(){
        //长春,四平,吉林
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigChangchun = new AreaConfig();
        areaConfigChangchun.setCityName("长春市");
        areaConfigChangchun.setCityUrl("https://changchun.loupan.com/community/");

        AreaConfig areaConfigSiping = new AreaConfig();
        areaConfigSiping.setCityUrl("https://siping.loupan.com/community/");
        areaConfigSiping.setCityName("四平市");


        AreaConfig areaConfigJilin = new AreaConfig();
        areaConfigJilin.setCityUrl("https://jl.loupan.com/community/");
        areaConfigJilin.setCityName("吉林市");

        areaConfigList.add(areaConfigChangchun);
        areaConfigList.add(areaConfigSiping);
        areaConfigList.add(areaConfigJilin);


        urlMap.put("吉林省",areaConfigList);
        return urlMap;
    }

    /**
     * 获取黑龙江省下的各个行政区的url
     * @return
     */
    private ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getHeiLongJiang(){
        //长春,四平,吉林
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigHrb = new AreaConfig();
        areaConfigHrb.setCityName("哈尔滨市");
        areaConfigHrb.setCityUrl("https://hrb.loupan.com/community/");
        areaConfigList.add(areaConfigHrb);

        urlMap.put("黑龙江省",areaConfigList);
        return urlMap;
    }

    /**
     * 获取辽宁省省下的各个行政区的url
     * @return
     */
    private ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getLiaoNing(){
        //大连,沈阳,铁岭,辽阳
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigChangchun = new AreaConfig();
        areaConfigChangchun.setCityName("大连市");
        areaConfigChangchun.setCityUrl("https://dl.loupan.com/community/");

        AreaConfig areaConfigSiping = new AreaConfig();
        areaConfigSiping.setCityUrl("https://sy.loupan.com/community/");
        areaConfigSiping.setCityName("沈阳市");


        AreaConfig areaConfigJilin = new AreaConfig();
        areaConfigJilin.setCityUrl("https://tieling.loupan.com/community/");
        areaConfigJilin.setCityName("铁岭市");


        AreaConfig areaConfigLIaoyan = new AreaConfig();
        areaConfigLIaoyan.setCityUrl("https://liaoyang.loupan.com/community/");
        areaConfigLIaoyan.setCityName("辽阳市");

        areaConfigList.add(areaConfigChangchun);
        areaConfigList.add(areaConfigSiping);
        areaConfigList.add(areaConfigJilin);
        areaConfigList.add(areaConfigLIaoyan);

        urlMap.put("吉林省",areaConfigList);
        return urlMap;
    }


    /**
     * 获取广东省下的各个行政区的url
     * @return
     */
    private ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getGuangDong(){
        //东莞佛山中山珠海江门惠州汕头
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigGuangzhou = new AreaConfig();
        areaConfigGuangzhou.setCityName("广州市");
        areaConfigGuangzhou.setCityUrl("https://gz.loupan.com/community/");

        AreaConfig areaConfigDongguan= new AreaConfig();
        areaConfigDongguan.setCityUrl("https://dg.loupan.com/community/");
        areaConfigDongguan.setCityName("东莞市");


        AreaConfig areaConfigFuoshan = new AreaConfig();
        areaConfigFuoshan.setCityUrl("https://fs.loupan.com/community/");
        areaConfigFuoshan.setCityName("佛山市");


        AreaConfig areaConfigZhongshan = new AreaConfig();
        areaConfigZhongshan.setCityUrl("https://zs.loupan.com/community/");
        areaConfigZhongshan.setCityName("中山市");

        AreaConfig areaConfigZhuhai = new AreaConfig();
        areaConfigZhuhai.setCityUrl("https://zh.loupan.com/community/");
        areaConfigZhuhai.setCityName("珠海市");

        AreaConfig areaConfigJiangmen = new AreaConfig();
        areaConfigJiangmen.setCityUrl("https://jm.loupan.com/community/");
        areaConfigJiangmen.setCityName("江门市");

        AreaConfig areaConfigHuiZhou = new AreaConfig();
        areaConfigHuiZhou.setCityUrl("https://huizhou.loupan.com/community/");
        areaConfigHuiZhou.setCityName("惠州市");

        AreaConfig areaConfigShantou = new AreaConfig();
        areaConfigShantou.setCityUrl("https://st.loupan.com/community/");
        areaConfigShantou.setCityName("汕头市");


        areaConfigList.add(areaConfigGuangzhou);
        areaConfigList.add(areaConfigDongguan);
        areaConfigList.add(areaConfigFuoshan);
        areaConfigList.add(areaConfigZhongshan);
        areaConfigList.add(areaConfigZhuhai);
        areaConfigList.add(areaConfigJiangmen);
        areaConfigList.add(areaConfigHuiZhou);
        areaConfigList.add(areaConfigShantou);
        urlMap.put("广东省",areaConfigList);
        return urlMap;
    }

    /**
     * 获取江苏省下的各个行政区的url
     * @return
     */
    private ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getJiangsu(){
        //南京苏州无锡徐州扬州连云港

        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigNanjing = new AreaConfig();
        areaConfigNanjing.setCityName("南京市");
        areaConfigNanjing.setCityUrl("https://nj.loupan.com/community/");

        AreaConfig areaConfigSuzhou = new AreaConfig();
        areaConfigSuzhou.setCityUrl("https://suzhou.loupan.com/community/");
        areaConfigSuzhou.setCityName("苏州市");


        AreaConfig areaConfigWuxi = new AreaConfig();
        areaConfigWuxi.setCityUrl("https://wuxi.loupan.com/community/");
        areaConfigWuxi.setCityName("无锡市");


        AreaConfig areaConfigYangzhou = new AreaConfig();
        areaConfigYangzhou.setCityUrl("https://yz.loupan.com/community/");
        areaConfigYangzhou.setCityName("扬州市");

        AreaConfig areaConfigLianyungang = new AreaConfig();
        areaConfigLianyungang.setCityUrl("https://lyg.loupan.com/community/");
        areaConfigLianyungang.setCityName("连云港市");

        AreaConfig areaConfigKunshan = new AreaConfig();
        areaConfigKunshan.setCityUrl("https://ks.loupan.com/community/");
        areaConfigKunshan.setCityName("昆山市");

        areaConfigList.add(areaConfigNanjing);
        areaConfigList.add(areaConfigSuzhou);
        areaConfigList.add(areaConfigWuxi);
        areaConfigList.add(areaConfigYangzhou);
        areaConfigList.add(areaConfigLianyungang);
        areaConfigList.add(areaConfigKunshan);

        urlMap.put("江苏省",areaConfigList);
        return urlMap;
    }


    /**
     * 获取福建省下的各个行政区的url
     * @return
     */
    private ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> getFujian(){
        //泉州厦门福州莆田
        ConcurrentHashMap<String, CopyOnWriteArrayList<AreaConfig>> urlMap = new ConcurrentHashMap<>();
        CopyOnWriteArrayList<AreaConfig> areaConfigList = new CopyOnWriteArrayList<>();
        AreaConfig areaConfigChangchun = new AreaConfig();
        areaConfigChangchun.setCityName("泉州市");
        areaConfigChangchun.setCityUrl("https://qz.loupan.com/community/");

        AreaConfig areaConfigSiping = new AreaConfig();
        areaConfigSiping.setCityUrl("https://xm.loupan.com/community/");
        areaConfigSiping.setCityName("厦门市");


        AreaConfig areaConfigJilin = new AreaConfig();
        areaConfigJilin.setCityUrl("https://fz.loupan.com/community/");
        areaConfigJilin.setCityName("福州市");


        AreaConfig areaConfigLIaoyan = new AreaConfig();
        areaConfigLIaoyan.setCityUrl("https://pt.loupan.com/community/");
        areaConfigLIaoyan.setCityName("莆田市");

        areaConfigList.add(areaConfigChangchun);
        areaConfigList.add(areaConfigSiping);
        areaConfigList.add(areaConfigJilin);
        areaConfigList.add(areaConfigLIaoyan);

        urlMap.put("福建省",areaConfigList);
        return urlMap;
    }
}
